package com.iemp.util;

import org.apache.commons.io.FilenameUtils;

public class CustomFilenameUtils {

    public static String formatFilenameTimeStamp(String originalFileName) {
        String basename = FilenameUtils.getBaseName(originalFileName);
        String timeStamp = System.currentTimeMillis() + "";
        String extension = FilenameUtils.getExtension(originalFileName);
        return basename + "-" + timeStamp + "." + extension;
    }

    public static void main(String[] args) {
        System.out.println(formatFilenameTimeStamp("IEntity.png"));
    }

}
